import React from "react";
//引入路由
import {Routes,Route} from "react-router-dom";

//引入页面组件
import Login from "./view/Login/Login";
import NotFound from "./view/NotFound/NotFound";
import DashView from "./view/DashView/DashView";

//引入权限判断，路由重定向组件
import Auth from "./component/Auth";



function App() {

  return (
      <div>
          {/*//路由处理*/}
          <Routes>
              {/*这里展示登录之后的页面*/}
              <Route path="/*" element={<Auth><DashView></DashView></Auth>}></Route>
              {/*登陆页面展示*/}
              <Route path="/login" element={<Login></Login>}></Route>
              {/*匹配不到的路径跳转到404页面*/}
              <Route path="*" element={<NotFound></NotFound>}></Route>
          </Routes>
      </div>
  )
}

export default App
